package com.yan.ems.constant;

import lombok.Getter;
import org.springframework.http.HttpStatus;

@Getter
public enum RespCode {
	SUCCESS(HttpStatus.OK.value(), "操作成功"),
	FAIL(HttpStatus.BAD_REQUEST.value(), "操作失败"),
	UNAUTHORIZED(HttpStatus.UNAUTHORIZED.value(), "未登录");

	// 状态码
	private final Integer code;
	// 消息
	private final String msg;

	// 构造方法，用于初始化枚举常量
	RespCode(Integer code, String msg) {
		this.code = code;
		this.msg = msg;
	}

}